package com.registration.controller;


import com.registration.service.PCUserRoleService;
import com.registration.util.JsonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/pcuserrole")
@CrossOrigin
public class PCUserRoleController {
    @Autowired
    PCUserRoleService pcUserRoleService;


    JsonResponse jsonResponse = new JsonResponse();

    @GetMapping("selectRoleIdByPCUserId")
    public JsonResponse selectRoleNameByPCUserId(Integer pc_user_id) {

        jsonResponse.setCode(0);
        jsonResponse.setData(pcUserRoleService.selectRoleIdByPCUserId(pc_user_id));
        return jsonResponse;
    }
}
